@*********************************************************************
* Generate a hidden HTML input.
*
* Example:
* {{{
*   @inputHidden(field = myForm("name"), args = 'data-ref -> 0)
* }}}
*
* @param field The form field.
* @param args Set of extra attributes.
* @param handler The field constructor.
*********************************************************************@



@(field: play.api.data.Field, args: (Symbol,Any)*)(implicit handler: FieldConstructor, lang: play.api.i18n.Lang)

@id = @{ args.toMap.get('id).map(_.toString).getOrElse(field.id) }
@inputType = @{ args.toMap.get('type).map(_.toString).getOrElse("hidden") }
@htmlArgs = @{ args.filter(arg => !arg._1.name.startsWith("_") && arg._1 != 'id).toMap.filter(_._1 != 'type) }

<input type="@inputType" id="@id" name="@field.name" value="@field.value" @toHtmlArgs(htmlArgs)>